import { defineStore } from "pinia";
import { getAccountListApi } from "../apis/user";


export const useCounterStore =defineStore("myStore",{

    state(){
        return {
            listData:[],
            pageNumber:1,
            pageSize:10,
            totalCount:10
        }
    },
    actions:{
        getList(){
       
            getAccountListApi({
                    pageNumber:this.pageNumber,
                    pageSize:this.pageSize
            }) 
          
            .then(res=>{
                    console.log("res666",res);
                    this.listData=res.data
                    this.totalCount=res.totalCount
              })
              .catch(err => {
                            console.log("err", err);
                           
                        })   
        }    

    }


})